package com.ray.mode.simple;

public class CarFactory {

    public static Car getCar(String name){
        if(name.equals("五菱")){
            return new Wuling();
        }else if(name.equals("特斯拉")){
            return new TeslaFactory();
        }
        return null;
    }
}
